package com.jinglvhuanjing.app.adapter;

import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.jinglvhuanjing.app.R;
import com.jinglvhuanjing.app.bean.DinSwitchBean;

public class DinsAdapter extends BaseMultiItemQuickAdapter<DinSwitchBean, BaseViewHolder> {
    public DinsAdapter(){
        addItemType(0 , R.layout.item_signal_output_layout);
    }
    @Override
    protected void convert(BaseViewHolder baseViewHolder, DinSwitchBean dinSwitchBean) {
        AppCompatTextView din_text = baseViewHolder.getView(R.id.din_text);
        AppCompatImageView switchImage = baseViewHolder.getView(R.id.din_switch_img);
        din_text.setText(dinSwitchBean.getName());
        switchImage.setSelected(dinSwitchBean.isChecked());
    }
}
